
const fp = require("lodash/fp")

const { Maybe, Container } = require("./3.index.js")

// 使用fp.add(x, y) 和fp.map(f, x) 创建一个能让functor 里的值增加的函数ex1

let maybe = Maybe.of([5, 6, 1])
console.log(maybe)
let ex1 = (x) => {
  return fp.map(val => fp.add(val, 10), x)
}
let res = maybe.map(ex1)
console.log(res)
